package com.zcr.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zcr.pojo.Gonggao;
import com.zcr.pojo.Jinhuorecords;
import com.zcr.service.GonggaoService;
import com.zcr.vo.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @version 1.0
 * @author： 张诚
 * @date： 2021-03-13 12:17
 */
@Controller
@RequestMapping("/gonggao")
public class GonggaoController {

    @Resource
    private GonggaoService gonggaoService;

    @GetMapping("/index")
    public String login(){
        return "shouye";
    }

    @ResponseBody()
    @GetMapping("/gonggaoindex")
    public Result getbyjinhuojiru(String drugname){
        List<Gonggao> list =gonggaoService.getByGongGao(drugname);
        return Result.sucess(list);
    }

}
